<?php
namespace app\admin\controller;
use framework\ext\Check;
use framework\ext\Http;

class AppsController extends \app\base\controller\AdminController{

    //检查版本
    public function version(){
        $cof = config('admin');
        $data['app'] = $cof['APP_NAME'];
        $rel = Http::doPost(dev().'/apps/client/version',$data,10);
        $str = $rel?$rel:'<span class="red fn-f14">检测最新版本超时,请稍后重试。</span>';
        echo $str;
    } 

     //查询授权
    public function vip(){
        $cof = config('admin');
        $data['app'] = $cof['APP_NAME'];
        $data['url'] = COME_URL;
        $rel = Http::doPost(dev().'/apps/client/vip',$data,10);
        $str = $rel?$rel:'<span class="red fn-f14">检测商业用户超时,请稍后重试。</span>';
        echo $str;
    } 

    //通知推送
    public function news(){
        $rel = Http::doGet(dev().'/apps/client/news',10);
        $str = $rel?$rel:'<span class="red fn-f14">尊敬的客户您好,没有收到官方通知信息或获取超时。</span>';
        echo $str;
    }  
}